Skip to content

fixed contitionals in prestart.sh for active theme and test data import - #13

Merged
misterbisson merged 3 commits into
autopilotpattern:progressfrom
10up:progress2
Apr 27, 2016
Merged

misterbisson merged 3 commits into
autopilotpattern:progressfrom
10up:progress2

Conversation

@jasondewitt

Copy link
Copy Markdown
Contributor

all testing good on triton

Jason DeWitt added 2 commits April 27, 2016 16:18
Comment thread bin/prestart.sh Outdated
wp --allow-root option update permalink_structure '/%year%/%monthnum%/%postname%/'
# set theme
if [ $WORDPRESS_ACTIVE_THEME ]
if [ -n $WORDPRESS_ACTIVE_THEME ]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should quote the var, as in: [ -n "$WORDPRESS_ACTIVE_THEME" ]

Comment thread bin/prestart.sh
fi

if [ $WORDPRESS_TEST_DATA ]
if [[ $WORDPRESS_TEST_DATA=true ]]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"true" has no special meaning in bash, so if this works, it's doing a string comparison and won't match "True", "TRUE", or "1" as you'd expect in PHP. Perhaps this should be tested the same as $WORDPRESS_ACTIVE_THEME above and many WP constants are, and simply test if it's set with a non-empty value? [ -n "WORDPRESS_TEST_DATA" ] should work reliably.

@misterbisson
misterbisson merged commit 01d369f into autopilotpattern:progress Apr 27, 2016
@jasondewitt
jasondewitt deleted the progress2 branch April 28, 2016 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants